package com.xiaoyilin.controller;

import com.xiaoyilin.annotation.RedisLock;
import com.xiaoyilin.annotation.RedisParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LockController {

    @GetMapping("/redis/lock")
    @RedisLock(prefix = "lock")
    public String query(@RedisParam(name = "token") @RequestParam String token) {
        return token;
    }


}
